﻿using System;
using System.Collections.Generic;
using NotifiableLinqTests.FrameWork;
using NUnit.Framework;

namespace LiveLinqTests
{
	[TestFixture]
	public class Concat : ItemNotificationTestsBase
	{
		[Test]
		public void Run()
		{
			SetupEnvironment();
			_source.Times = 5;
			_source2.NotificationTestsBase = this;
			_source.LetsDance(() =>
			{
				_listener.PerformAssert();
				_source2.LetsDance(() => _listener.PerformAssert());
			});
		}

		readonly Source<IItem> _source2 = new Source<IItem> { Times = 5, Name="Source2" };

		public override object QuerySut(IEnumerable<IItem> source)
		{
			return LiveLinq.ObservableEnumerable.Concat(source, _source2);
		}

		public override object QueryActual(IEnumerable<IItem> source)
		{
			return System.Linq.Enumerable.Concat(source, _source2);
		}
	}
}
